﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Editorial/Writer/MasterPage_Writer.master" AutoEventWireup="true" CodeBehind="NewsCompose.aspx.cs" Inherits="Ones.Editorial.Writer.NewsCompose" %>

<%--<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>--%>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server"> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMain" runat="server">
    <div class="row">
        <div class="col-md-12">
            <h2 class="page-title">
                News Compose
            </h2>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="alert alert-block alert-success fade in" id="successfulMsg" runat="server">
                <button type="button" class="close close-sm" data-dismiss="alert">
                    <i class="icon-remove"></i>
                </button>
                <strong>News is added successfully !</strong> Go back to <a href="NewsDisplay.aspx">News Display</a> for more details.
            </div>
            <div class="alert alert-block alert-danger fade in" id="failMsg" runat="server">
                <button type="button" class="close close-sm" data-dismiss="alert">
                    <i class="icon-remove"></i>
                </button>
                <strong>News cannot be added !</strong> Please check the content.
            </div>
            <div class="widget">
                <div class="widget-header">
                    <div class="widget-header">
                        <i class="icon-file-alt"></i>
                        <h3>
                            News
                        </h3>
                    </div>
                </div>
                <div class="widget-content">
                    <ul class="nav nav-tabs" id="myTab">
                        <li class="active">
                            <a data-toggle="tab" href="#tabCompose">Compose News</a>
                        </li>
                        <li class="">
                            <a data-toggle="tab" href="#tabPreview" onclick="BoundData">Review News</a>
                        </li>
                    </ul>
                    <div class="tab-content" id="myTabContent">
                        <div id="tabCompose" class="tab-pane fade active in">
                            <form id="frmAds" method="post" class="form-horizontal validate-needed-form required">
                                <fieldset>
                                    <legend class="section">
                                        News Details
                                    </legend>
                                    <!--Title Control Group-->
                                    <div class="control-group">
                                        <div class="col-md-3">
                                            <label class="control-label" for="title">
                                                Title <span class="required">*</span>
                                            </label>
                                        </div>
                                        <div class="col-md-9">
                                            <div class="form-group">
                                                <input id="txtTitle" class="form-control parsley-validated" type="text" name="title" required="" runat="server">
                                            </div>
                                        </div>
                                    </div>
                                    <!--Categoy Control Group-->
                                    <div class="control-group">
                                        <div class="col-md-3">
                                            <label class="control-label" for="title">
                                                Category <span class="required">*</span>
                                            </label>
                                        </div>
                                        <div class="col-md-9">
                                            <asp:DropDownList class="form-control" ID="ddlCategory" DataTextField="catName" DataValueField="catId" runat="server"> </asp:DropDownList>
                                        </div>
                                    </div>
                                    <!--Brief Introduction Group-->
                                    <div class="control-group">
                                        <div class="col-md-3">
                                            <label class="control-label" for="description">
                                                Brief Introduction
                                            </label>
                                        </div>
                                        <div class="col-md-9">
                                            <div class="form-group">
                                                <textarea id="txtNewsIntro" class="form-control" rows="3" name="text" runat="server"></textarea>
                                                <span class="help-block">Optional summary of your news that can be used in previews</span>
                                            </div>
                                        </div>
                                    </div>
                                    <!--Author Group-->
                                    <div class="control-group">
                                        <div class="col-md-3">
                                            <label class="control-label" for="description">
                                                Author
                                            </label>
                                        </div>
                                        <div class="col-md-9">
                                            <div class="form-group">
                                                <label id="lblAuthor" runat="server"> </label>
                                            </div>
                                        </div>
                                    </div>
                                    <!--Content Group-->
                                    <div class="control-group">
                                        <div class="col-md-3">
                                            <label class="control-label" for="text">
                                                Content
                                            </label>
                                        </div>
                                        <div class="col-md-9">
                                            <CKEditor:CKEditorControl ID="NewsEditor" runat="server"></CKEditor:CKEditorControl>

                                        </div>
                                    </div>
                                    <!--Comment Group-->
                                    <div class="control-group">
                                        <div class="col-md-3">
                                            <label class="control-label" for="text">
                                                Author's comment
                                            </label>
                                        </div>
                                        <div class="col-md-9">
                                            <input id="txtComment" class="form-control parsley-validated" type="text" name="Comment" required="" runat="server">
                                        </div>
                                    </div>
                                    <!--File Upload Group-->
                                    <div class="row fileupload-buttonbar">
                                        <div class="col-lg-7">
                                            <div class="btn-toolbar">
                                                <asp:Label ID="lblInfoMsg" runat="server"></asp:Label>
                                            <%--                                            <span class="btn btn-success fileinput-button"><i class="icon-plus"></i><span>Add files...</span>
                                            <input type="file" multiple="" name="files[]">
                                            </span>
                                            <button class="btn btn-primary start" type="submit">
                                            <i class="icon-upload"></i><span>Start upload</span>
                                            </button>
                                            <button class="btn btn-warning cancel" type="reset">
                                            <i class="icon-ban-circle"></i><span>Cancel upload</span>
                                            </button>
                                            <button class="btn btn-danger delete" type="button">
                                            <i class="icon-trash"></i><span>Delete</span>
                                            </button>
                                            <input class="toggle" type="checkbox">
                                            <span class="fileupload-loading"></span>--%>
                                            </div>
                                        </div>
                                    </div>
                                </fieldset>
                                <!--Post-Cancel-->
                                <div class="form-actions">
                                    <div>
                                        <asp:LinkButton ID="btnComposeNews" class="btn btn-success" runat="server" Text="Post" CommandName="cmdPost" OnCommand="NewsCompose_Confirm"/>
                                        <asp:LinkButton ID="btnCancel" class="btn btn-default" runat="server" Text="Cancel" CommandName="cmdCancel" OnCommand="NewsCompose_Confirm"/>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <!--Preview Tab-->
                        <div id="tabPreview" class="tab-pane fade">
                            <form id="frmNewsPReview" method="post" class="form-horizontal validate-needed-form required">
                                <fieldset>
                                    <legend class="section">
                                        News Preview
                                    </legend>
                                    <!--Tilte Preview-->
                                    <div class="control-group lable-padd">
                                        <div class="col-md-3">
                                            <label for="hint-field" class="control-label">
                                                Title
                                            </label>
                                        </div>
                                        <div class="col-md-9">
                                            <label id="lblTitle" for="hint-field" class="control-label" runat="server"/>
                                        </div>
                                    </div>
                                    <!--Posting Date Preview-->
                                    <div class="control-group lable-padd">
                                        <div class="col-md-3">
                                            <label for="hint-field" class="control-label">
                                                Date
                                            </label>
                                        </div>
                                        <div class="col-md-9"> </div>
                                    </div>
                                    <!--Content Preview-->
                                    <div class="control-group lable-padd">
                                        <div class="col-md-3">
                                            <label for="hint-field" class="control-label">
                                                Content
                                            </label>
                                        </div>
                                        <div class="col-md-9"> </div>
                                    </div>
                                </fieldset>
                                <!--Post-Edit-->
                                <div class="form-actions">
                                    <div>
                                        <button class="btn btn-success" type="submit">
                                            Post
                                        </button>
                                        <button class="btn btn-default" type="button">
                                            Edit
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphScript" runat="server"> </asp:Content>
